Skip to content

Conversation

@Davidson-Souza
Copy link
Member

Description and Notes

In #698 small bug where our node would stop responding during start-up, on very specific conditions was introduced.

If we broadcast a transaction and shutdown floresta before it gets confirmed, then try to start floresta again, we would get stuck. This happens because electrum would try to use the node handle to broadcast a transaction, but since FlorestaNode wouldn't be running, the electrum server would never get an answer, blocking forever.

This commit fixes this by moving the re-broadcast to then main loop. Now the re-broadcast code will try to broadcast again every 24 hours, until the tx gets confirmed. This makes sure our transaction won't fall off the mempool. It also only broadcasts after the node left IBD, to avoid having a transaction that gets stuck inside our mempool due to it already being confirmed.

I've also made all ElectrumServer's field private, there's no reason for them to be public.

How to verify the changes you have done?

To reproduce the bug: broadcast a transaction that spends from/to a cached address, then before it confirms, shut florestad down gracefully. When you restart it, it won't go past a log message about the RPC being up. On this branch it should start as expected.

@Davidson-Souza Davidson-Souza self-assigned this Feb 6, 2026
@Davidson-Souza Davidson-Souza added the bug Something isn't working label Feb 6, 2026
@jaoleal jaoleal self-requested a review February 8, 2026 18:23
In getfloresta#698 small bug where our node would stop responding during start-up, on very
specific conditions was introduced.

If we broadcast a transaction and shutdown floresta before it gets confirmed,
then try to start floresta again, we would get stuck. This happens because
electrum would try to use the node handle to broadcast a transaction, but
since `FlorestaNode` wouldn't be running, the electrum server would never get a
n answer, blocking forever.

This commit fixes this by moving the re-broadcast to then main loop. Now the
re-broadcast code will try to broadcast again every 24 hours, until the tx
gets confirmed. This makes sure our transaction won't fall off the mempool.
It also only broadcasts after the node left IBD, to avoid having a
transaction that gets stuck inside our mempool due to it already being
confirmed.

I've also made all ElectrumServer's field private, there's no reason for
them to be public.
Copy link
Member

@luisschwab luisschwab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK ca9cd88

@luisschwab luisschwab requested a review from JoseSK999 February 12, 2026 18:22
@jaoleal
Copy link
Collaborator

jaoleal commented Feb 12, 2026

ACK ca9cd88

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants